package cn.imnaer.service.rest.resquest.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import cn.imnaer.service.persistence.model.SharePhoto;
import cn.imnaer.service.persistence.model.SharePhotoItem;

public class SharePhotoCreateParams implements Serializable {
    private String userId;

    private String sharePhotoName;

    private String score;

    private String type;

    private String placeType;

    private String placeId;

    private String placeName;

	private boolean   isShare;

    private List<SharePhotoItemParams> items = new ArrayList<SharePhotoItemParams>();

    private List<TribalCircleCreateParams> tribalParams = new ArrayList<>();

    public SharePhotoCreateParams() {

    }

    public SharePhotoCreateParams(String userId,
                                  String sharePhotoName, String score, String type, String placeType,
                                  String placeId, String placeName, List<SharePhotoItemParams> items) {
        super();
        this.userId = userId;
        this.sharePhotoName = sharePhotoName;
        this.score = score;
        this.type = type;
        this.placeType = placeType;
        this.placeId = placeId;
        this.placeName = placeName;
        this.items = items;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }



    public String getSharePhotoName() {
        return sharePhotoName;
    }

    public void setSharePhotoName(String sharePhotoName) {
        this.sharePhotoName = sharePhotoName;
    }


    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPlaceType() {
        return placeType;
    }

    public void setPlaceType(String placeType) {
        this.placeType = placeType;
    }

    public String getPlaceId() {
        return placeId;
    }

    public void setPlaceId(String placeId) {
        this.placeId = placeId;
    }

    public String getPlaceName() {
        return placeName;
    }

    public void setPlaceName(String placeName) {
        this.placeName = placeName;
    }

    public List<SharePhotoItemParams> getItems() {
        return items;
    }

    public void setItems(List<SharePhotoItemParams> items) {
        this.items = items;
    }

    public SharePhoto caseToSharePhoto() {
        SharePhoto sharePhoto = new SharePhoto();
        sharePhoto.setPlaceId(this.getPlaceId());
        sharePhoto.setType(this.type);
        sharePhoto.setPlaceName(this.placeName);
        sharePhoto.setSharePhotoName(this.getSharePhotoName());
        sharePhoto.setScore(this.getScore());
        sharePhoto.setUserId(this.userId);
        sharePhoto.setIsShare(this.isShare);
        sharePhoto.setPlaceType(this.getPlaceType());
        List<SharePhotoItem> sharePhotoItems = SharePhotoItemParams.caseToSharePhotoItems(this.getItems());
        sharePhoto.setItems(sharePhotoItems);
        return sharePhoto;
    }
    public boolean getIsShare() {
		return isShare;
	}

	public void setIsShare(boolean isShare) {
		this.isShare = isShare;
	}

    public boolean isShare() {
        return isShare;
    }

    public void setShare(boolean isShare) {
        this.isShare = isShare;
    }

    public List<TribalCircleCreateParams> getTribalParams() {
        return tribalParams;
    }

    public void setTribalParams(List<TribalCircleCreateParams> tribalParams) {
        this.tribalParams = tribalParams;
    }
}
